//导入Vue文件
import Vue from 'vue'
//导入跟组件
import App from './App.vue'
// 导入路由配置
import router from './router'

import 'lib-flexible/flexible'

//axios
import axios from 'axios'
import VueAxios from 'vue-axios'

Vue.use(VueAxios, axios)


// 组件配置
import {
  Tabbar,
  TabbarItem,
  Swipe,
  SwipeItem,
  Search,
  Tab,
  Tabs,
  NoticeBar,
  NavBar,
  Sidebar,
  SidebarItem,
  Empty,
  ActionSheet,
  Stepper,
  GoodsAction,
  GoodsActionIcon,
  GoodsActionButton,
  Field,
  ShareSheet,
  Popup,
  Toast,
  SubmitBar,
  Card,
  Checkbox,
  Icon,
  Dialog,
  Button,
  AddressEdit,
  Area,
  CheckboxGroup,
  AddressList,
  
} from 'vant';


// 组件调用
Vue
  .use(Tabbar)
  .use(TabbarItem)
  .use(Swipe)
  .use(SwipeItem)
  .use(Search)
  .use(Tab)
  .use(Tabs)
  .use(NoticeBar)
  .use(NavBar)
  .use(Sidebar)
  .use(SidebarItem)
  .use(Empty)
  .use(ActionSheet)
  .use(Stepper)
  .use(GoodsAction)
  .use(GoodsActionIcon)
  .use(GoodsActionButton)
  .use(Field)
  .use(ShareSheet)
  .use(Popup)
  .use(Toast)
  .use(SubmitBar)
  .use(Card)
  .use(Checkbox)
  .use(Icon)
  .use(Dialog)
  .use(Button)
  .use(AddressEdit)
  .use(Area)
  .use(CheckboxGroup)
  .use(AddressList)



// 生产环境关闭提示信息
Vue.config.productionTip = false




// 将所有 Toast 的展示时长设置为 2000 毫秒
Toast.setDefaultOptions({ duration: 1000 });

// 将所有 loading Toast 设置为背景不可点击
Toast.setDefaultOptions('loading', { forbidClick: true });

// 创建实例
new Vue({
  router,
  render: h => h(App)
}).$mount('#app')